//此文件是专门用来写接口请求函数的
//每个接口都对应一个函数，我们需要调用这个函数就能往这个接口发送请求拿数据
import Ajax from '@/utils/request'//封装过后的axios(sevise)
import mockAjax from '@/utils/mockRequest'

//请求三级分类数据
export const reqCategoryList = ()=>{
    return Ajax({
        url:'/product/getBaseCategoryList',
        //method不能加s
        method:'GET'
    })
}
// reqCategoryList()

//轮播图
export const reqBannerList = ()=>{
    return mockAjax({
        url:'/banner',
        method:'GET'
    })
}
//楼层里的图
export const reqFloorList = ()=>{
    return mockAjax({
        url:'/floor',
        method:'GET'
    })
}
//search页面数据 searchParams是请求体参数
export const reqGoodsListInfo = (searchParams)=>{
    return Ajax({
        url:'/list',
        method:'POST',
        //method不能加s
        data:searchParams
    })
}
// reqGoodsListInfo({});